<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 用async await 方法，可以用[a, b, c]接受promise.all方法的数组返回值
    async function text() {
        const p1 = new Promise((resolve, reject) => {
            resolve('1')
        })
        const p2 = new Promise((resolve, reject) => {
            resolve('2')
        })
        const p3 = new Promise((resolve, reject) => {
            resolve('3')
        })
        const [a, b, c] = await Promise.all([p1, p2, p3])
        const res = Array.from([a, b, c])
        console.log(res);
        console.log(res instanceof Array);
    }
    text()
</script>

</html>